const array1 =[1,3,5,6,8,8,8];

function maxinum(arr) {
   const maximum = Math.max(...arr);
   const maximumArr = arr.filter(function(item,index){
      return item === maximum;
   });
   return {maximum, "length":maximumArr.length}
}

console.log(maxinum(array1));